package com.tools.hry.xls.exception;

/**
 * Created by 峥桂 on 2017/1/12.
 */
public class ExcelErrorLogBean {
    private int rowNum;
    private int cellIndex;
    private String message;
    private Exception exception;
    private Object obj;
    private ExcelErrorLogBean(){}
    public ExcelErrorLogBean(int rowNum, int cellIndex, String message, Exception exception, Object obj) {
        this.rowNum = rowNum;
        this.cellIndex = cellIndex;
        this.message = message;
        this.exception = exception;
        this.obj=obj;
    }

    public Object getObj() {
        return obj;
    }

    public void setObj(Object obj) {
        this.obj = obj;
    }

    public int getRowNum() {
        return rowNum;
    }

    public void setRowNum(int rowNum) {
        this.rowNum = rowNum;
    }

    public int getCellIndex() {
        return cellIndex;
    }

    public void setCellIndex(int cellIndex) {
        this.cellIndex = cellIndex;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Exception getException() {
        return exception;
    }

    public void setException(Exception exception) {
        this.exception = exception;
    }

    @Override
    public String toString() {
        if(cellIndex==-1){
            return "第"+rowNum+"行存在问题【"+message+"】，请检查\r\n";
        }
        return "第"+rowNum+"行第"+cellIndex+"列存在问题【"+message+"】，请检查\r\n";
    }
}